package custom;


import java.io.IOException;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import org.primefaces.component.api.UIData;

public class PageLinkRendererCustom {

    public void render(FacesContext context, UIData uidata, String linkClass, String iconClass, boolean disabled, String texto_link) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        String styleClass = disabled ? linkClass + " ui-state-disabled" : linkClass;

        writer.startElement("span", null);
        writer.writeAttribute("class", styleClass, null);
        
        writer.startElement("span", null);
        //writer.writeAttribute("class", iconClass, null);
        writer.writeText(texto_link, null);
        writer.endElement("span");
        
        writer.endElement("span");
    }    
}